import {h,init} from 'snabbdom'
let patch = init([])
let vnode = h('div#contain',[
    h('h1','Hello Snabbdom'),
    h('p','这是一个p标签')
])

let app = document.querySelector('#app')
let oldVnode = patch(app, vnode)

setTimeout(() => {
    vnode = h('div#contain',[
        h('h1','Hello World'),
        h('p','Hello P')
    ])
    patch(oldVnode,vnode)

    // patch(oldVnode,null)
    patch(oldVnode,h('!'))
}, 2000);

